package com.wanmait.employment.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wanmait.employment.entity.CompanyScale;
import com.wanmait.employment.entity.FinancingStage;
import com.wanmait.employment.mapper.FinancingStageMapper;
import com.wanmait.employment.service.FinancingStageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FinancingStageServiceImpl implements FinancingStageService {
    @Resource
    private FinancingStageMapper financingStageMapper;


    @Override
    public List<FinancingStage> selectList(String title) {
        QueryWrapper<FinancingStage> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("title",title);
        List<FinancingStage> financingStages = financingStageMapper.selectList(queryWrapper);
        return financingStages;
    }

    @Override
    public Integer update(FinancingStage financingStage) {
        return financingStageMapper.updateById(financingStage);
    }

    @Override
    public Integer insert(FinancingStage financingStage) {

        return financingStageMapper.insert(financingStage);
    }

    @Override
    public void delete(Integer id) {
        financingStageMapper.deleteById(id);

    }

    @Override
    public List<FinancingStage> findAll() {
        List<FinancingStage> financingStageList=financingStageMapper.selectList(null);
        return financingStageList;
    }
}
